home *** CD-ROM | disk | FTP | other *** search
/ Internet Pratica / IPRAT_01.iso / ASP / ASPapp Portal / click_thru.asp < prev    next >
Text File  |  2002-03-12  |  1KB  |  79 lines

  1. <!-- #include file="i_utils.asp" -->
  2. <%
  3. %>
  4. <%
  5.  
  6. LinkId = request("LinkId")
  7.  
  8. if LinkId <> "" then
  9.  
  10. set rs = cn.Execute ("SELECT URL, ClickThrus FROM Links WHERE LinkId = "  & LinkId)
  11. URL = rs("URL")
  12. ClickThrus = rs("ClickThrus")
  13. if not IsNull(ClickThrus) then
  14. ClickThrus = ClickThrus + 1
  15. else
  16. ClickThrus = 1
  17. end if
  18. rs.Close
  19. ''' increment the click_thrus
  20. cn.Execute ("UPDATE Links SET ClickThrus = " & ClickThrus & " WHERE LinkId = "  & LinkId)
  21. response.redirect URL
  22.  
  23. end if
  24.  
  25. %>
  26. <%
  27.     dim dummy
  28.  
  29.  
  30.  
  31.  
  32.  
  33. do_search = request("do_search")
  34. ''' request form keys
  35. ''' request action
  36. action = lcase(request("action"))
  37. ''' action case handler
  38. select case action
  39.  
  40. end select
  41.  
  42. '  no action was specified, so handle the default case(s)
  43.  
  44. %>
  45.  
  46. <!-- #include file='i_header.asp' -->
  47. <!-- #include file='i_menu.asp' -->
  48.  
  49.  
  50. <%
  51. display_errs
  52. display_msg
  53. %>
  54.  
  55. <table class='menuTable' >
  56.         
  57.         <input type=hidden name="dummy" value="<% =dummy %>">
  58.         
  59. </tr>
  60.  
  61. </table>
  62.  
  63.  
  64.  
  65. <!-- #include file=i_footer.asp -->
  66.  
  67.  
  68. <%
  69. ':: assure that any db resources are freed
  70. on error resume next
  71. rs.Close
  72. set rs = NOTHING
  73. cn.Close
  74. set cn = NOTHING
  75. user_cn.Close
  76. set user_cn = NOTHING
  77. on error goto 0
  78. %>
  79.